/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.krazevina.kar;

import com.sun.lwuit.Button;
import com.sun.lwuit.Container;
import com.sun.lwuit.Font;
import com.sun.lwuit.Label;
import com.sun.lwuit.TextArea;
import com.sun.lwuit.plaf.Border;
import com.sun.lwuit.plaf.Style;

/**
 *
 * @author XXX
 */
public class S {
    static void setBtnBotStyle(Button t){
        Style s = new Style();
        s.setBorder(null);
        s.setBgTransparency(0);
        s.setMargin(0, 0, 0, 0);
        Style s1 = new Style();
        s1.setBorder(null);
        s1.setBgTransparency(0);
        s1.setMargin(0, 0, 0, 0);
        s1.setBorder(Border.createLineBorder(2,0x00ff00));
        t.setUnselectedStyle(s);
        t.setSelectedStyle(s1);
        t.setPressedStyle(s);
        t.getStyle().merge(s);
    }
    
    static void setBtnLangStyle(Button t){
        Style s = new Style();
        s.setBorder(null);
        s.setBgTransparency(0);
        s.setMargin(6, 6, 0, 6);
        s.setFgColor(0x888888);
        Style s1 = new Style();
        s1.setBorder(null);
        s1.setBgTransparency(0);
        s1.setMargin(6, 6, 0, 6);
        s1.setFgColor(0x888888);
        s1.setBorder(Border.createLineBorder(2,0x00ff00));
        t.setUnselectedStyle(s);
        t.setSelectedStyle(s1);
        t.setPressedStyle(s);
        t.getStyle().merge(s);
    }
    
    static void setBtnSearchStyle(Button t){
        Style s = new Style();
        s.setBorder(null);
        s.setBgTransparency(0);
        s.setMargin(6, 6, 6, 6);
        Style s1 = new Style();
        s1.setBorder(null);
        s1.setBgTransparency(0);
        s1.setMargin(6, 6, 6, 6);
        s1.setBorder(Border.createLineBorder(2,0x00ff00));
        t.setUnselectedStyle(s);
        t.setSelectedStyle(s1);
        t.setPressedStyle(s);
        t.getStyle().merge(s);
    }
    
    static void sets(TextArea t){
        Style s = new Style();
        s.setBorder(null);
        s.setBgTransparency(0);
        s.setMargin(6, 6, 0, 0);
        s.setFgColor(0x000000);
        Style s1 = new Style();
        s1.setBorder(null);
        s1.setBgTransparency(0);
        s1.setMargin(6, 6, 0, 0);
        s1.setFgColor(0x000000);
        s1.setBorder(Border.createLineBorder(2, 0x00ff00));
        t.setUnselectedStyle(s);
        t.setSelectedStyle(s1);
        t.setPressedStyle(s);
        t.getStyle().merge(s);
        t.getSelectedStyle().setBorder(Border.createLineBorder(2, 0x00ff00));
    }
    static void setTrans(Label text1){
        Style s = new Style();
        s.setFgColor(0x000000);
        s.setBgTransparency(0);
        s.setFont(Font.createSystemFont(Font.FACE_PROPORTIONAL, Font.STYLE_BOLD, Font.SIZE_SMALL));
        s.setMargin(0, 0, 0, 0);
        text1.setUnselectedStyle(s);
        text1.setPressedStyle(s);
        text1.setSelectedStyle(s);
        text1.setDisabledStyle(s);
    }
    static void setTrans(TextArea text1){
        Style s = new Style();
        s.setFgColor(0x000000);
        s.setBgTransparency(0);
        s.setFont(Font.createSystemFont(Font.FACE_PROPORTIONAL, Font.STYLE_BOLD, Font.SIZE_SMALL));
        s.setMargin(0, 0, 0, 0);
        text1.setEnabled(false);
        text1.setDisabledStyle(s);
    }
    static void setTrans1(Label text1,int color){
        Style s = new Style();
        s.setBorder(null);
        s.setBgTransparency(0);
        s.setFgColor(color);
        s.setFont(Font.createSystemFont(Font.FACE_SYSTEM, Font.STYLE_PLAIN, Font.SIZE_SMALL));
        s.setMargin(0, 0, 0, 0);
        text1.setUnselectedStyle(s);
        text1.setPressedStyle(s);
        text1.setSelectedStyle(s);
        text1.setDisabledStyle(s);
    }
    static void setTrans(Button text1){
        Style s = new Style();
        s.setBorder(null);
        s.setFgColor(0x000000);
        s.setBgTransparency(0);
        s.setFont(Font.createSystemFont(Font.FACE_PROPORTIONAL, Font.STYLE_PLAIN, Font.SIZE_MEDIUM));
        s.setMargin(0, 0, 0, 0);
        Style s1 = new Style();
        s1.setFgColor(0xff0000);
        s1.setBorder(Border.createLineBorder(1, 0x4898d0));
        s1.setBgTransparency(0);
        s1.setFont(Font.createSystemFont(Font.FACE_PROPORTIONAL, Font.STYLE_PLAIN, Font.SIZE_MEDIUM));
        s1.setMargin(0, 0, 0, 0);
        text1.setUnselectedStyle(s);
        text1.setPressedStyle(s1);
        text1.setSelectedStyle(s1);
        text1.setDisabledStyle(s);
        text1.setPreferredH(40);
    }
    static void setTransF(Button text1){
        Style s = new Style();
        s.setFgColor(0xffffff);
        s.setBgTransparency(0);
        s.setFont(Font.createSystemFont(Font.FACE_PROPORTIONAL, Font.STYLE_PLAIN, Font.SIZE_MEDIUM));
        s.setMargin(0, 0, 0, 0);
        Style s1 = new Style();
        s1.setFgColor(0xff0000);
        s1.setBgTransparency(0);
        s1.setFont(Font.createSystemFont(Font.FACE_PROPORTIONAL, Font.STYLE_PLAIN, Font.SIZE_MEDIUM));
        s1.setMargin(0, 0, 0, 0);
        text1.setUnselectedStyle(s);
        text1.setPressedStyle(s1);
        text1.setSelectedStyle(s1);
        text1.setDisabledStyle(s);
        text1.setPreferredH(40);
    }
    
    static void setTransTop(Button text1,int w){
        Style s = new Style();
        s.setFgColor(0x000000);
        s.setMargin(0, 0, 0, 0);
        s.setPadding(0, 0, 0, 0);
        s.setBorder(Border.createLineBorder(2, 0x00ff00));
        
        Style s1 = new Style();
        s1.setFgColor(0xff0000);
        s1.setMargin(0, 0, 0, 0);
        s1.setPadding(0, 0, 0, 0);
        s1.setBorder(null);
        
        text1.setUnselectedStyle(s1);
        text1.setPressedStyle(s);
        text1.setSelectedStyle(s);
        text1.setDisabledStyle(s1);
        text1.setPreferredH(40);
        text1.setPreferredW(w);
    }
    static void setTransABC(Button text1,int w){
        Style s = new Style();
        s.setFgColor(0x000000);
        s.setBgColor(0x357ed5);
        s.setMargin(3, 3, 3, 3);
        s.setPadding(0, 0, 0, 0);
        s.setAlignment(Container.CENTER);
        s.setBorder(null);
        
        Style s1 = new Style();
        s1.setFgColor(0x000000);
        s1.setBgColor(0xd5d5d5);
        s1.setMargin(3, 3, 3, 3);
        s1.setPadding(0, 0, 0, 0);
        s1.setAlignment(Container.CENTER);
        s1.setBorder(null);
        
        text1.setUnselectedStyle(s1);
        text1.setPressedStyle(s);
        text1.setSelectedStyle(s);
        text1.setDisabledStyle(s1);
        text1.setPreferredH(40);
        text1.setPreferredW(w);
    }
    static void setTransLblAbc(Label text1){
        Style s = new Style();
        s.setFgColor(0x858585);
        s.setBgColor(0xd5d5d5);
        s.setBgTransparency(255);
        s.setFont(Font.createSystemFont(Font.FACE_PROPORTIONAL, Font.STYLE_PLAIN, Font.SIZE_MEDIUM));
        s.setMargin(0, 0, 0, 0);
        s.setPadding(0, 0, 10, 0);
        text1.setUnselectedStyle(s);
        text1.setPressedStyle(s);
        text1.setSelectedStyle(s);
        text1.setDisabledStyle(s);
    }
}
